home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / java / sql / SQLException$1.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  1.1 KB  |  49 lines

  1. package java.sql;
  2.  
  3. import java.util.Iterator;
  4. import java.util.NoSuchElementException;
  5.  
  6. final class SQLException$1 implements Iterator<Throwable> {
  7.    SQLException firstException;
  8.    SQLException nextException;
  9.    Throwable cause;
  10.    // $FF: synthetic field
  11.    final SQLException this$0;
  12.  
  13.    SQLException$1(SQLException var1) {
  14.       this.this$0 = var1;
  15.       this.firstException = this.this$0;
  16.       this.nextException = this.firstException.getNextException();
  17.       this.cause = this.firstException.getCause();
  18.    }
  19.  
  20.    public boolean hasNext() {
  21.       return this.firstException != null || this.nextException != null || this.cause != null;
  22.    }
  23.  
  24.    public Throwable next() {
  25.       Object var1 = null;
  26.       if (this.firstException != null) {
  27.          var1 = this.firstException;
  28.          this.firstException = null;
  29.       } else if (this.cause != null) {
  30.          var1 = this.cause;
  31.          this.cause = this.cause.getCause();
  32.       } else {
  33.          if (this.nextException == null) {
  34.             throw new NoSuchElementException();
  35.          }
  36.  
  37.          var1 = this.nextException;
  38.          this.cause = this.nextException.getCause();
  39.          this.nextException = this.nextException.getNextException();
  40.       }
  41.  
  42.       return (Throwable)var1;
  43.    }
  44.  
  45.    public void remove() {
  46.       throw new UnsupportedOperationException();
  47.    }
  48. }
  49.